home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / ftn / shadem.z / shadem
Encoding:
Text File  |  2002-10-03  |  5.0 KB  |  133 lines

  1.  
  2.  
  3.  
  4. sssshhhhaaaaddddeeeemmmm((((3333GGGG))))                                                          sssshhhhaaaaddddeeeemmmm((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      sssshhhhaaaaddddeeeemmmm - selects the shading model
  10.  
  11. FFFFOOOORRRRTTTTRRRRAAAANNNN 77777777 SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  12.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee sssshhhhaaaaddddeeeemmmm((((mmmmooooddddeeeellll))))
  13.      iiiinnnntttteeeeggggeeeerrrr****4444 mmmmooooddddeeeellll
  14.  
  15. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  16.      _m_o_d_e_l   expects one of two possible flags:
  17.  
  18.              FFFFLLLLAAAATTTT, tells the system to assign the same color to each pixel of
  19.              lines and polygons during scan conversion.
  20.  
  21.              GGGGOOOOUUUURRRRAAAAUUUU, tells the system to interpolate color from vertex to
  22.              vertex when scan converting lines, and to interpolate color
  23.              throughout the area of filled polygons when they are scan
  24.              converted.  This is the default shading model.
  25.  
  26. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  27.      sssshhhhaaaaddddeeeemmmm determines the shading model that the system uses to render lines
  28.      and filled polygons.  When the system uses Gouraud shading, the colors
  29.      along a line segment are an interpolation of the colors at its vertices,
  30.      and the colors in the interior of a filled polygon are an interpolation
  31.      of the colors at its vertices.  In RGB mode, red, green, blue, and alpha
  32.      (when supported) are all interpolated.  Currently the interpolation is
  33.      linear.  Future architectures may do nonlinear interpolation to
  34.      compensate for errors due to extreme projection.
  35.  
  36.      When flat shading is specified, color is not interpolated.  Rather, the
  37.      color of the second vertex of a line segment, or of the last vertex of a
  38.      polygon, is used at each pixel of the line segment or polygon.  Thus
  39.      connected lines, triangles, and quadrilaterals can be successfully flat
  40.      shaded.  For example, the color of the _nth segment in a connected line is
  41.      determined by the color of vertex _n+_1, and the color of the _nth triangle
  42.      in a mesh is determined by the color of vertex _n+_2.
  43.  
  44.      Color interpolation or flat shading occurs after lighting and depthcueing
  45.      calculations are made, so both these color generation operations can be
  46.      either flat or Gouraud shaded.  Texture, fog, and blending calculations,
  47.      however, occur after pixel shading is completed.  These operations are
  48.      always themselves Gouraud shaded, regardless of the current shade model.
  49.      This means, for example, that a triangle mesh can be lighted or depthcued
  50.      with flat shaded facets, then fogged or texture mapped smoothly.
  51.  
  52. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  53.      getsm
  54.  
  55. NNNNOOOOTTTTEEEE
  56.      Gouraud is the default shading model, but is in general slower than flat
  57.      shading. To improve performance, specify flat shading where Gouraud
  58.      shading is not required.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. sssshhhhaaaaddddeeeemmmm((((3333GGGG))))                                                          sssshhhhaaaaddddeeeemmmm((((3333GGGG))))
  71.  
  72.  
  73.  
  74. BBBBUUUUGGGGSSSS
  75.      On IRIS-4D B and G models, and on the Personal Iris without Turbo
  76.      Graphics, lines are always drawn with constant color regardless of the
  77.      current shading model.  Also, flat shaded independent polygons scan
  78.      convert to a single color, but this color is not always that of the last
  79.      vertex specified, Flat shaded polygons yield consistent results on these
  80.      models only when the same color is specified at each vertex.  On Infinite
  81.      Reality and Impact flat shaded independent polygons are shaded the color
  82.      of the first vertex.
  83.  
  84.      On IRIS-4D GT and GTX models, lines drawn with mmmmoooovvvveeee and ddddrrrraaaawwww are always
  85.      flat shaded, and lines drawn with vvvv commands are always Gouraud shaded,
  86.      regardless of the current shading model.  Independent polygons are always
  87.      Gouraud shaded.  Triangle meshes are correctly flat or Gouraud shaded,
  88.      depending on the shading model.
  89.  
  90.      On early versions of IRIS-4D GT and GTX models, alpha is not interpolated
  91.      correctly within polygons.
  92.  
  93.      On IRIS-4D VGX models, independent quads will flat-shade with the color
  94.      from the third vertex instead of the fourth.
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.